/*function child(data) {
    pictureArr = data.split(',');
    /!*$('#image').remove()
    $('#one').prepend('<img id="image" src='+pictureArr[0]+' style="width:590px;height:370px;"/>')
*!/}*/
var pictureArr
$(function () {
 //   alert("imgUrls:" + imgUrls)
    pictureArr = imgUrls.split(',');
  //  alert("pictureArr.length:" + pictureArr.length)
  //  console.log(pictureArr)
})
var i = 1;
function nextPic() {

    if (pictureArr.length === 2){
        $('#image').remove()
        // 只有一张图片
        var url = pictureArr[0]//'http://5b0988e595225.cdn.sohucs.com/images/20170817/fbd1d393e8294f29934b9afcaa9e650e.jpeg'
        $('#one').prepend('<img id="image" src='+url+' style="width:590px;height:370px;"/>')

        url = "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1570215101199&di=09897d6880ad36558fa844277173d140&imgtype=0&src=http%3A%2F%2Fwww.seotcs.com%2Fpublic%2Fueditor%2Fphp%2Fupload1%2F2018090414%2F13721-1-120G6234R0317.jpg"
        $('#one').prepend('<img id="image" src='+url+' style="width:590px;height:370px;"/>')
        return
    }

    //alert("i" + i)
    if (i<pictureArr.length ) {
/*        for (i = 1; i < pictureArr.length; i++) {
            $('#image').remove()
            // 只有一张图片
            alert("有一张图：" + i)
            var url = pictureArr[i]//'http://5b0988e595225.cdn.sohucs.com/images/20170817/fbd1d393e8294f29934b9afcaa9e650e.jpeg'
            alert("url:" + url)
            $('#one').prepend('<img id="image" src='+url+' style="width:590px;height:370px;"/>')
            i += 1;
            break
        }*/
        for (var k = 1; i < pictureArr.length; k++) {
            $('#image').remove()
            // 只有一张图片
        //    alert("有一张图：" + i)
            var url = pictureArr[i]//'http://5b0988e595225.cdn.sohucs.com/images/20170817/fbd1d393e8294f29934b9afcaa9e650e.jpeg'
        //    alert("url:" + url)

            if(url != ""){
                $('#one').prepend('<img id="image" src='+url+' style="width:590px;height:370px;"/>')
                i += 1;
                break
            } else {
                url = "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1570215101199&di=09897d6880ad36558fa844277173d140&imgtype=0&src=http%3A%2F%2Fwww.seotcs.com%2Fpublic%2Fueditor%2Fphp%2Fupload1%2F2018090414%2F13721-1-120G6234R0317.jpg"
                $('#one').prepend('<img id="image" src='+url+' style="width:590px;height:370px;"/>')
                break
            }


        }
    }else {
        $('#image').remove()
        var url = pictureArr[0]//'http://5b0988e595225.cdn.sohucs.com/images/20170817/fbd1d393e8294f29934b9afcaa9e650e.jpeg'
        $('#one').prepend('<img id="image" src='+url+' style="width:590px;height:370px;"/>')
        i=1;
    }


}